package edu.purdue.touch.piccolo.bridge;

import javax.swing.JComponent;

import edu.purdue.touch.piccolo.event.PTouchEventManager;

import TUIO.TuioCursor;
import TUIO.TuioListener;
import TUIO.TuioObject;
import TUIO.TuioTime;

public class PTouchInterface extends JComponent implements TuioListener {
	
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	public PTouchInterface(){
	}

	//Add a Small Low Pass Filter...
	@Override
	public void addTuioCursor(TuioCursor tcur) {
		PTouchEventManager.getInstance().fireaddEvent(tcur);
	}
	
	@Override
	public void updateTuioCursor(TuioCursor arg0) {
		PTouchEventManager.getInstance().fireupdateEvent(arg0);
	}
	
	@Override
	public void removeTuioCursor(TuioCursor tcur) {
		PTouchEventManager.getInstance().fireremoveEvent(tcur);
	}

	@Override
	public void refresh(TuioTime ttime) {
		PTouchEventManager.getInstance().fireRefreshEvent(ttime);
	}
	
	@Override
	public void addTuioObject(TuioObject tobj) {
		PTouchEventManager.getInstance().objectAdded(tobj);
	}

	@Override
	public void removeTuioObject(TuioObject tobj) {
		PTouchEventManager.getInstance().objectRemoved(tobj);
	}

	@Override
	public void updateTuioObject(TuioObject tobj) {
		PTouchEventManager.getInstance().objectUpdated(tobj);
	}
}
